package CHigh;

public class FEnum {

    public static void main(String[] args) {

        Week week = Week.Mondy;
        System.out.println(week.toString());

        Week[] values = Week.values();
        for (Week value : values) {
            System.out.println(value);
        }

        System.out.println("调用 valueOf() 方法：");
        Week male1 = Week.valueOf("Mondy");
        System.out.println(male1.getWeekText());

    }


    enum Week {
        Mondy("一"),
        Tues("二");

        private final String weekText;

        Week(String weekText) {
            this.weekText = weekText;
        }

        public String getWeekText(){
            return weekText;
        }
    }
}
